package com.bitantenna.messages;

import com.bitantenna.Message;

public class MessageKeepAlive extends Message {
	int statsConsumersTreeCount=0;

	@Override
	public void fromBytes(byte[] input) {
		statsConsumersTreeCount(Message.paramFromPacket(input, 1));		
	}

	@Override
	public void toBytes(byte[] output) {
		Message.paramFromPacket(output, 1, statsConsumersTreeCount());		
		Message.setMessageId(output, MessageIdKeepAlive);

	}
	
	public int statsConsumersTreeCount() {
		return statsConsumersTreeCount;
	}
	
	public void statsConsumersTreeCount(int c) {
		statsConsumersTreeCount=c;
	}

	@Override
	public int toByteSize() {
		return 2*4;
	}
	
}
